﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/H-ui/lib/layer/2.4/layer.js"></script>
    <link href="~/H-ui/lib/layer/2.4/skin/layer.css" rel="stylesheet" />
</head> 
<body>
    <div style="float:left;width:170px;height:220px;margin-left:70px">
       <div style="width:170px;height:48px">
           <img src="~/img2/R]S47ATGWT~[OCU_`(KAEK3.png"/>
       </div>
        <div style="width:170px;height:87px;background-color:#fc6624;text-align:center;">
            <p>题库总题数</p>
            <p>_?_题</p>
        </div>
        <div style="width:170px;height:60px;margin-top:10px">
            <img src="~/img2/~V5PRNXZS~1YP3{6[S71UT6.png" onclick="tj()"/>
        </div>
    </div>
    <div style="float:right;margin-right:60px">
        <div>
            @*查询框*@
            <div style="width:1000px;height:220px;border:1px solid #ded9d9;background-color:#f7f2f2">
                <table style="width:1000px;height:200px;">
                    <tr>
                        <td>题目类型：@Html.DropDownList("tx", ViewBag.tx as SelectList)</td>
                        <td>试题编号：<input id="Text1" type="text" /></td>
                        <td>题干关键词：<input id="Text1" type="text" /></td>
                    </tr>
                    <tr>
                        <td>难度：<input id="Text1" type="text" placeholder="难度级别1--5" /></td>
                        <td colspan="2">
                            试题状态：
                            <input id="Button1" type="button" value="可使用" />
                            <input id="Button1" type="button" value="已删除" />
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            出题时间：<input id="Text1" type="text" /><span>--</span><input id="Text1" type="text" />
                        </td>
                        <td>标签：<input id="Text1" type="text" /></td>
                    </tr>
                    <tr>
                        <td colspan="3" style="text-align:center;"><input id="搜索试题" type="button" value="搜索试题" /></td>
                    </tr>
                </table>
            </div>
            <br /><br /><br />
            @*内容*@
            <div>
                @foreach (var item in Model)
            {
                    <table style="width:1000px;height:auto;border:1px solid #c3a7a7;" cellpadding="0" cellspacing="0">
                        <tr style="background-color:#c4bebe">
                            @if (@item.questionId == 1.ToString())
                            {
                                <td>
                                    @*题型*@单选题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                            else if (@item.questionId == 2.ToString())
                            {
                                <td>
                                    @*题型*@多选题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                            else if (@item.questionId == 3.ToString())
                            {
                                <td>
                                    @*题型*@不定项选择题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                            else if (@item.questionId == 4.ToString())
                            {
                                <td>
                                    @*题型*@填空题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                            else if (@item.questionId == 5.ToString())
                            {
                                <td>
                                    @*题型*@判断题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                            else
                            {
                                <td>
                                    @*题型*@问答题&nbsp;&nbsp;&nbsp;
                                    @*题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目题目*@
                                    @item.topicName
                                </td>
                            }
                        </tr>
                        <tr>
                            <td>参考答案：@item.topicJieXi</td>
                        </tr>
                        <tr>
                            <td style="float:right">
                                试题编号：@item.topicId<span>|</span>
                                默认分值：@item.topicFenZhi<span>|</span>
                                难度：@item.topicNandu&nbsp;&nbsp;
                                <input id="Button1" type="button" value="编辑" onclick="updt(@item.topicId)" />
                                <input id="Button1" type="button" value="删除" onclick="del(@item.topicId)" />
                            </td>
                        </tr>
                    </table>
                    <br />
                }

            </div>
        </div>
    </div>
  
    <script>
        //删除
        function del(id)
        {
            location.href = "/QuestionBank/delExam?id="+id;
        }
        //修改
        function updt(id)
        {
            location.href = "/QuestionBank/showExamByid?id="+id;
        }
        //模态
        function tj()
        {
           
            layer.open({
                type: 2,
                shade: 0.5,
                title: false, //不显示标题
                area: ['566px', '244px'],
                content: "/QuestionBank/Motai",
            })            
        } 
    </script>
</body>
</html>
